<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <!-- 需求:  div>p#one>这是一个p  -->
    <div id="root"></div>
    <script src="./js/react.development.js"></script>
    <script src="./js/react-dom.development.js"></script>
    <script src="./js/babel.min.js"></script>
    <!-- script标签上写了type="text/babel".则这个script里面的代码就会被babel解析 -->
    <script type="text/babel">
      // 这段在js中写的标签官方学名: jsx(javascript xml)
      // jsx是语法糖: 最终解析成了React.createElement
      const div = (
        <div>
          <p id="one">这是一个p</p>
        </div>
      )

      ReactDOM.render(div, document.getElementById('root'))
    </script>
  </body>
</html>
